# coding=utf-8

from flask_script import Manager
from flask_migrate import Migrate, MigrateCommand
#from flask_jsonrpc import JSONRPC

from apps import init_app,db

app = init_app("dev")

manager = Manager(app)

# 启用数据迁移工具
Migrate(app, db)
# 添加数据迁移的命令到终端脚本工具中
manager.add_command('db', MigrateCommand)

from apps.modules.common.models import SiteConfig,Nav,Banner
from apps.modules.goods.models import GoodsCategory,Goods,GoodsImage
from apps.modules.news.models import NewsCategory,News

@app.route('/')
def index():
  return 'hello,hahahaha'

# api接口列表
from apps.modules.common import api
from apps.modules.news import api
from apps.modules.goods import api
if __name__ == '__main__':
  manager.run()
